popovertargetaction
Newly available across major browsers

Chrome 114, Chrome Android 114, Edge 114, Firefox 125, Firefox Android 125, Opera 100, Safari 17, Safari iOS 17

Baseline since 2024

Specifies the action to be performed on a popover element being controlled by a control <button>. Possible values are:
"hide"

The button will hide a shown popover. If you try to hide an already hidden popover, no action will be taken.

"show"

The button will show a hidden popover. If you try to show an already showing popover, no action will be taken.

"toggle"

The button will toggle a popover between showing and hidden. If the popover is hidden, it will be shown; if the popover is showing, it will be hidden. If popovertargetaction is omitted, "toggle" is the default action that will be performed by the control button.

By Mozilla Contributors, CC BY-SA 2.5